package com.xy.blog.zuul.config;


import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.CommandLineRunner;
import org.springframework.context.annotation.Configuration;

/**
 * @author zanhonglei
 * @version V1.0
 * @Description:
 * @date 2019/11/10 6:01 下午
 */
@Configuration
public class ZuulConfiguration implements CommandLineRunner {

    private Logger logger = LoggerFactory.getLogger(ZuulConfiguration.class);

    @Value("${server.port}")
    private int port;


    @Override
    public void run(String... args) throws Exception {
        logger.info("访问地址：http://localhost:"+port+"/api/<服务名>/<接口地址>");

        logger.info("Swagger2 URL: http://localhost:" + port + "/api/swagger-ui.html");
    }

}
